import {ref} from 'vue'
import {defineStore} from 'pinia'

export const useUserStore = defineStore(
  'user',
  ()=>{
    // 定义state
    const token = ref<string | null>(null)

    // 千万不要忘记这里要return
    return {token}
  },
  {
    // 指定存储
    unistorage: {
      key:'cp-patient-user',
      paths:['token'],
    }
  }
  
)